<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/astronaut32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/astronaut16.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">

<link rel="stylesheet" href="fonts.googleapis.com/css?family=EB Garamond:300,300italic,400,400italic,700,700italic|Cinzel Decorative:300,300italic,400,400italic,700,700italic|Noto Serif SC:300,300italic,400,400italic,700,700italic|Source Code Pro:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-pace-theme-minimal.min.css">
  <script src="/lib/pace/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"fat_fat_where_are_you.gitee.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":"mac"},"back2top":{"enable":false,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":true,"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@500&display=swap" rel="stylesheet">
  <meta name="description" content="HTML与CSS学习8 这篇笔记主要讲了HTML5和CSS3的新特性HTML5新增了语义化标签，多媒体标签，input表单CSS3新增了属性选择器，结构伪类选择器(child类型，of-type选择器)，伪元素选择器，不受padding和margin影响的盒子模型，类似动画的过渡属性，模糊属性，和执行计算函数这篇笔记是初学者写下的笔记，如有错误，欢迎前来指正">
<meta property="og:type" content="article">
<meta property="og:title" content="HTML 与 CSS 学习 8">
<meta property="og:url" content="http://fat_fat_where_are_you.gitee.io/archives/f12c57c1.html">
<meta property="og:site_name" content="肥肉啊肥肉你在哪">
<meta property="og:description" content="HTML与CSS学习8 这篇笔记主要讲了HTML5和CSS3的新特性HTML5新增了语义化标签，多媒体标签，input表单CSS3新增了属性选择器，结构伪类选择器(child类型，of-type选择器)，伪元素选择器，不受padding和margin影响的盒子模型，类似动画的过渡属性，模糊属性，和执行计算函数这篇笔记是初学者写下的笔记，如有错误，欢迎前来指正">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-07-18T07:54:26.000Z">
<meta property="article:modified_time" content="2020-07-18T07:54:26.000Z">
<meta property="article:author" content="肥肉啊肥肉你在哪">
<meta property="article:tag" content="HTML与CSS">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://fat_fat_where_are_you.gitee.io/archives/f12c57c1.html">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>
<link rel="stylesheet" type="text/css" href="/css/injector/main.css"><link rel="preload" as="style" href="/css/injector/light.css"><link rel="preload" as="style" href="/css/injector/dark.css">
  <title>HTML 与 CSS 学习 8 | 肥肉啊肥肉你在哪</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

  <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">肥肉啊肥肉你在哪</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-movies">

    <a href="/movies/" rel="section"><i class="fa fa-film fa-fw"></i>观影</a>

  </li>
        <li class="menu-item menu-item-books">

    <a href="/books/" rel="section"><i class="fa fa-book fa-fw"></i>阅读</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" placeholder="搜索..." spellcheck="false" type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="reading-progress-bar"></div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://fat_fat_where_are_you.gitee.io/archives/f12c57c1.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/touxiang.gif">
      <meta itemprop="name" content="肥肉啊肥肉你在哪">
      <meta itemprop="description" content>
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="肥肉啊肥肉你在哪">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          HTML 与 CSS 学习 8
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-07-18 15:54:26" itemprop="dateCreated datePublished" datetime="2020-07-18T15:54:26+08:00">2020-07-18</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%89%8D%E7%AB%AF/" itemprop="url" rel="index"><span itemprop="name">前端</span></a>
                </span>
            </span>

          
          
          <br>
            <span id="/archives/f12c57c1.html" class="post-meta-item leancloud_visitors" data-flag-title="HTML 与 CSS 学习 8" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="far fa-comment"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/archives/f12c57c1.html#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/archives/f12c57c1.html" itemprop="commentCount"></span>
    </a>
  </span>
  
  <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>5.9k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>5 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="HTML 与 CSS 学习 8"><a href="#HTML 与 CSS 学习 8" class="headerlink" title="HTML 与 CSS 学习 8"></a>HTML 与 CSS 学习 8</h1><blockquote>
<p>这篇笔记主要讲了 HTML5 和 CSS3 的新特性 <br>HTML5 新增了语义化标签，多媒体标签，input 表单<br>CSS3 新增了属性选择器，结构伪类选择器(child 类型，of-type 选择器)，伪元素选择器，不受 padding 和 margin 影响的盒子模型，类似动画的过渡属性，模糊属性，和执行计算函数<br> 这篇笔记是初学者写下的笔记，如有错误，欢迎前来指正</p>
</blockquote>
<span id="more"></span>

<h2 id="HTML5 新特性"><a href="#HTML5 新特性" class="headerlink" title="HTML5 新特性"></a>HTML5 新特性</h2><ul>
<li>  有兼容性的问题，基本上在 IE9 以上才能使用</li>
</ul>
<h3 id="HTML5 新增语义化标签"><a href="#HTML5 新增语义化标签" class="headerlink" title="HTML5 新增语义化标签"></a>HTML5 新增语义化标签</h3><ul>
<li>  终结了所有盒子都叫 div</li>
<li>  新增标签：</li>
</ul>
<table>
<thead>
<tr>
<th align="center">标签</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center"><header></header></td>
<td align="center">头部标签</td>
</tr>
<tr>
<td align="center"><nav></nav></td>
<td align="center">导航标签</td>
</tr>
<tr>
<td align="center"><article></article></td>
<td align="center">内容标签</td>
</tr>
<tr>
<td align="center"><section></section></td>
<td align="center">定义文档某个区域</td>
</tr>
<tr>
<td align="center"><aside></aside></td>
<td align="center">侧边栏标签</td>
</tr>
<tr>
<td align="center"><footer></footer></td>
<td align="center">尾部标签</td>
</tr>
</tbody></table>
<ul>
<li>  在 IE9 使用需要转化成块级元素</li>
</ul>
<h3 id="HTML5 新增的多媒体标签"><a href="#HTML5 新增的多媒体标签" class="headerlink" title="HTML5 新增的多媒体标签"></a>HTML5 新增的多媒体标签</h3><ul>
<li>  音频：<audio></audio></li>
<li>  视频：<video></video></li>
</ul>
<h4 id="视频标签 -video"><a href="# 视频标签 -video" class="headerlink" title="视频标签 (video)"></a>视频标签 (video)</h4><ul>
<li><p>只支持 mp4(<strong>支持的最多</strong>)，webm，ogg</p>
</li>
<li><p>语法规范：</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">video</span> <span class="attr">src</span>=<span class="string">&quot; 文件地址 &quot;</span> <span class="attr">controls</span>=<span class="string">&quot;controls&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">video</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>  属性值：</p>
</li>
</ul>
<table>
<thead>
<tr>
<th align="center">标签</th>
<th align="center">值</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center">autoplay</td>
<td align="center">autoplay</td>
<td align="center">视频自动播放 (google 浏览器禁用了这个属性)</td>
</tr>
<tr>
<td align="center">controls</td>
<td align="center">controls</td>
<td align="center">向用户展示播放控件</td>
</tr>
<tr>
<td align="center">width</td>
<td align="center">px(像素)</td>
<td align="center">设置播放器宽度</td>
</tr>
<tr>
<td align="center">height</td>
<td align="center">px(像素)</td>
<td align="center">设置播放器高度</td>
</tr>
<tr>
<td align="center">loop</td>
<td align="center">loop</td>
<td align="center">播放完成后是否循环播放</td>
</tr>
<tr>
<td align="center">preload</td>
<td align="center">auto(预加载视频) none(不预加载视频)</td>
<td align="center">是否预加载视频</td>
</tr>
<tr>
<td align="center">src</td>
<td align="center">url 地址</td>
<td align="center">视频 url 地址</td>
</tr>
<tr>
<td align="center">poster</td>
<td align="center">image(图片)</td>
<td align="center">加载等待画面图片</td>
</tr>
<tr>
<td align="center">muted</td>
<td align="center">muted</td>
<td align="center">静音播放</td>
</tr>
</tbody></table>
<ul>
<li>  解决 Google 浏览器不能自动播放的问题，在 autoplay 的基础上添加 muted 属性 (muted=“muted”)</li>
<li>  controls 一般用 js 解决</li>
</ul>
<h4 id="音频标签 -audio"><a href="# 音频标签 -audio" class="headerlink" title="音频标签 (audio)"></a>音频标签 (audio)</h4><ul>
<li><p>  支持音频格式：mp3(<strong>支持的最多</strong>) ，wav，ogg</p>
</li>
<li><p>语法规范：</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">audio</span> <span class="attr">src</span>=<span class="string">&quot; 文件地址 &quot;</span> <span class="attr">controls</span>=<span class="string">&quot;controls&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">audio</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
</ul>
<table>
<thead>
<tr>
<th align="center">标签</th>
<th align="center">值</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center">autoplay</td>
<td align="center">autoplay</td>
<td align="center">音频自动播放 (google 浏览器也禁用了这个属性)</td>
</tr>
<tr>
<td align="center">controls</td>
<td align="center">controls</td>
<td align="center">向用户展示播放控件</td>
</tr>
<tr>
<td align="center">loop</td>
<td align="center">loop</td>
<td align="center">循环播放</td>
</tr>
<tr>
<td align="center">src</td>
<td align="center">url</td>
<td align="center">播放音频的位置</td>
</tr>
</tbody></table>
<ul>
<li>  google 禁用音频只能通过 js 来解决</li>
</ul>
<h3 id="HTML5 新增 input 表单"><a href="#HTML5 新增 input 表单" class="headerlink" title="HTML5 新增 input 表单"></a>HTML5 新增 input 表单</h3><ul>
<li>  input 新增的 type 属性值：</li>
</ul>
<table>
<thead>
<tr>
<th align="center">type 属性值</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center">email</td>
<td align="center">输入为 email 类型</td>
</tr>
<tr>
<td align="center">url</td>
<td align="center">url 类型</td>
</tr>
<tr>
<td align="center">date</td>
<td align="center">日期</td>
</tr>
<tr>
<td align="center">time</td>
<td align="center">时间</td>
</tr>
<tr>
<td align="center">month</td>
<td align="center">月</td>
</tr>
<tr>
<td align="center">week</td>
<td align="center">周</td>
</tr>
<tr>
<td align="center">number</td>
<td align="center">数字</td>
</tr>
<tr>
<td align="center">tel</td>
<td align="center">手机号码</td>
</tr>
<tr>
<td align="center">search</td>
<td align="center">搜索框</td>
</tr>
<tr>
<td align="center">color</td>
<td align="center">颜色选择表单</td>
</tr>
</tbody></table>
<ul>
<li><p>代码案例：</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;email&quot;</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>  使用时如果内容错误，点击提交的时候会报错</p>
</li>
</ul>
<h4 id="HTML5 新增表单属性"><a href="#HTML5 新增表单属性" class="headerlink" title="HTML5 新增表单属性"></a>HTML5 新增表单属性</h4><ul>
<li><p>语法规范：</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">input</span> <span class="attr">required</span>=<span class="string">&quot;required&quot;</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
</ul>
<table>
<thead>
<tr>
<th align="center">属性</th>
<th align="center">值</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center">required</td>
<td align="center">required</td>
<td align="center">表单拥有属性后不能为空，必填</td>
</tr>
<tr>
<td align="center">placeholder</td>
<td align="center">提示文本</td>
<td align="center">表单提示信息，存在默认值将不显示</td>
</tr>
<tr>
<td align="center">autofocus</td>
<td align="center">autofocus</td>
<td align="center">自动聚焦属性，页面加载完成后自动聚焦到指定表单</td>
</tr>
<tr>
<td align="center">autocomplete</td>
<td align="center">off / on</td>
<td align="center">在当用户成功提交过，下次搜索就可以自动填充，默认为 on，开发时改为 off</td>
</tr>
<tr>
<td align="center">multiple</td>
<td align="center">multiple</td>
<td align="center">可以多选文件提交(经常和 type=”file”使用)</td>
</tr>
</tbody></table>
<ul>
<li>required 同样在提交时报错</li>
<li>  更改 placeholder 里文字的颜色：</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">input</span><span class="selector-pseudo">::placeholder</span> &#123;</span><br><span class="line">    <span class="attribute">color</span>: skyblue;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>


<p>​<br>​    </p>
<h2 id="CSS3 新特性"><a href="#CSS3 新特性" class="headerlink" title="CSS3 新特性"></a>CSS3 新特性</h2><ul>
<li>  兼容性：IE9 以上支持</li>
</ul>
<h3 id="CSS3 新增选择器"><a href="#CSS3 新增选择器" class="headerlink" title="CSS3 新增选择器"></a>CSS3 新增选择器</h3><ol>
<li> 属性选择器</li>
<li> 结构伪类选择器</li>
<li> 伪类选择器</li>
</ol>
<h4 id="属性选择器"><a href="# 属性选择器" class="headerlink" title="属性选择器 []"></a>属性选择器 []</h4><ul>
<li><p>选择元素有某个属性的标签</p>
</li>
<li><p>注意：属性选择器权重为 10 (方括号内的才算属性选择器)</p>
</li>
<li><p>代码案例：</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></span><br><span class="line"><span class="css">  <span class="comment">/* 选择 input 标签里有 value 属性的标签 */</span></span></span><br><span class="line"><span class="css">  <span class="selector-tag">input</span><span class="selector-attr">[value]</span> &#123;</span></span><br><span class="line"><span class="css">      <span class="attribute">color</span>: skyblue;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css">  <span class="comment">/* 选择 input 标签 value 属性为 select 的标签 */</span></span></span><br><span class="line"><span class="css">  <span class="selector-tag">input</span><span class="selector-attr">[value=<span class="string">&quot;select&quot;</span>]</span> &#123;</span></span><br><span class="line"><span class="css">      <span class="attribute">color</span>: red;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">value</span>=<span class="string">&quot; 请输入用户名 &quot;</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">value</span>=<span class="string">&quot;select&quot;</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>可以选择属性值开头的某些元素</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* 选择那些 div 盒子里有 class 属性，且属性值以 icon 开头的元素 */</span></span><br><span class="line"><span class="selector-tag">div</span><span class="selector-attr">[class^=icon]</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: blue;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>选择某些属性值结尾的某些元素</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">div</span><span class="selector-attr">[class$=icon]</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: grey;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>选择值里面有这个文字的元素</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* 只要是 class 属性里有 icon 值的都选出来 */</span></span><br><span class="line"><span class="selector-tag">div</span><span class="selector-attr">[class*=icon]</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: green;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li>
</ul>
<h4 id="结构伪类选择器"><a href="# 结构伪类选择器" class="headerlink" title="结构伪类选择器"></a>结构伪类选择器</h4><ul>
<li>  权重为 10</li>
</ul>
<h5 id="child 类型"><a href="#child 类型" class="headerlink" title="child 类型"></a>child 类型</h5><ul>
<li><p>代码示例：</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-tag">ul</span> <span class="selector-tag">li</span><span class="selector-pseudo">:first</span>-child &#123;</span></span><br><span class="line"><span class="css">    <span class="comment">/* 选择 ul 下面第一个叫 li 元素 */</span></span></span><br><span class="line"><span class="css">    <span class="comment">/* 相同的类型还有 last-child，nth-child(n)；第 n 个元素，n 可以是数字，关键字和公式 */</span></span></span><br><span class="line"><span class="css">    <span class="attribute">background-color</span>: skyblue;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>实例：隔行变色</p>
</li>
<li><p>用到 nth-child 里的关键字 even- 偶数 odd- 奇数</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">ul</span> <span class="selector-tag">li</span><span class="selector-pseudo">:nth-child</span>(odd) &#123;</span><br><span class="line">  <span class="attribute">background-color</span>: grey;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>nth-child 里面的公式 如果 n 是公式，则会从 0 开始计算，每次加一，但是第 0 个元素和超出的元素个数会被忽略</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">ul</span> <span class="selector-tag">li</span><span class="selector-pseudo">:nth-child</span>(n) &#123;</span><br><span class="line">  <span class="attribute">background-color</span>: grey;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>注意：只能用 n 这个字母，但是可以使用加减乘除常数</p>
</li>
<li><p>  例如 2n 就选择偶数，n+5 就是从第五个开始选择到最后</p>
</li>
</ul>
<h5 id="of-type 类"><a href="#of-type 类" class="headerlink" title="of-type 类"></a>of-type 类</h5><ul>
<li><p>语法规范</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">ul</span> <span class="selector-tag">li</span><span class="selector-pseudo">:first</span>-of-type &#123;&#125;</span><br><span class="line"><span class="selector-tag">ul</span> <span class="selector-tag">li</span><span class="selector-pseudo">:last-of-type</span> &#123;&#125;</span><br><span class="line"><span class="selector-tag">ul</span> <span class="selector-tag">li</span><span class="selector-pseudo">:nth-of-type</span>(n) &#123;&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>child 类：</p>
<ul>
<li>  nth-child 会把所有盒子排序</li>
<li>然后先看 nth-child(1)找到那个元素，然后再看前面它指定的标签，如果这两个不匹配，那么这个样式就不显现出来</li>
</ul>
</li>
<li><p>of-type 类：</p>
<ul>
<li>  nth-of-type(1)会把指定元素排序</li>
<li>  然后再把第一个元素指定样式</li>
</ul>
</li>
</ul>
<h4 id="伪元素选择器"><a href="# 伪元素选择器" class="headerlink" title="伪元素选择器"></a>伪元素选择器</h4><ul>
<li>  CSS 创建标签，不需要 HTML 标签</li>
<li>  权重为 1</li>
</ul>
<table>
<thead>
<tr>
<th align="center">值</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center">::before</td>
<td align="center">在父元素内容的前面插入内容</td>
</tr>
<tr>
<td align="center">::after</td>
<td align="center">在元素内容的后面插入内容</td>
</tr>
</tbody></table>
<ul>
<li><p>before 和 after 创建一个行内元素</p>
</li>
<li><p>语法规范：</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">div</span><span class="selector-pseudo">::before</span> &#123;</span><br><span class="line">  <span class="attribute">color</span>: skyblue;</span><br><span class="line">  <span class="comment">/* 必须书写的属性 */</span></span><br><span class="line">  <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>注意：before 和 after 必须有 content 属性 (类似于内容)</p>
</li>
<li><p>before 和 after 需要放到父元素的前面或后面</p>
</li>
<li><p>  元素和:: 不能有空隙</p>
</li>
</ul>
<h5 id="伪元素实例"><a href="# 伪元素实例" class="headerlink" title="伪元素实例"></a>伪元素实例</h5><ul>
<li><p>搜索框后面的小箭头</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.fake</span> &#123;</span></span><br><span class="line"><span class="css">    <span class="attribute">width</span>: <span class="number">200px</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">height</span>: <span class="number">35px</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">border</span>: <span class="number">1px</span> solid red;</span></span><br><span class="line"><span class="css">    <span class="attribute">position</span>: relative;</span></span><br><span class="line"><span class="css">&#125;</span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css"><span class="selector-class">.fake</span><span class="selector-pseudo">::after</span> &#123;</span></span><br><span class="line"><span class="css">    <span class="attribute">content</span>: <span class="string">&quot;^&quot;</span>;</span></span><br><span class="line"><span class="css">    <span class="comment">/* 用定位来做，防止影响其他元素 */</span></span></span><br><span class="line"><span class="css">    <span class="attribute">position</span>: absolute;</span></span><br><span class="line"><span class="css">    <span class="attribute">top</span>: <span class="number">10px</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">right</span>: <span class="number">0px</span>;</span></span><br><span class="line"><span class="css">&#125;</span></span><br><span class="line"><span class="css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;fake&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>半遮罩层效果</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.box</span><span class="selector-pseudo">::before</span> &#123;</span></span><br><span class="line"><span class="css">    <span class="attribute">content</span>: <span class="string">&#x27;&#x27;</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">position</span>: absolute;</span></span><br><span class="line"><span class="css">    <span class="attribute">top</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">left</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">width</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">height</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">background</span>: <span class="built_in">rgba</span>(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>,.<span class="number">3</span>);</span></span><br><span class="line"><span class="css">&#125;</span></span><br><span class="line"><span class="css"><span class="comment">/* 中间不能有空格 */</span></span></span><br><span class="line"><span class="css"><span class="selector-class">.box</span><span class="selector-pseudo">:hover</span><span class="selector-pseudo">::before</span> &#123;</span></span><br><span class="line"><span class="css">    <span class="attribute">display</span>: block;</span></span><br><span class="line"><span class="css">&#125;</span></span><br><span class="line"><span class="css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;box&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>  伪元素清除浮动 (在 demo7 里面)</p>
</li>
</ul>
<h3 id="CSS3 盒子模型 -box-sizing"><a href="#CSS3 盒子模型 -box-sizing" class="headerlink" title="CSS3 盒子模型 (box-sizing)"></a>CSS3 盒子模型 (box-sizing)</h3><ul>
<li><p>原来的盒子增加 border，padding 会撑大盒子</p>
</li>
<li><p>CSS3 解决了这个问题！</p>
</li>
<li><p>语法规范：</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">div</span> &#123;</span><br><span class="line">  <span class="attribute">box-sizing</span>: content-box | border-box;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>content-box <strong>默认值</strong> 盒子大小为 width+padding+border</p>
</li>
<li><p>border-box 盒子最终大小为 width (padding 和 margin 不要大于 width 宽度)</p>
</li>
<li><p>  可以在 CSS 初始化时加上这个属性</p>
</li>
</ul>
<h3 id="CSS3 图片变模糊 -filter"><a href="#CSS3 图片变模糊 -filter" class="headerlink" title="CSS3 图片变模糊 (filter)"></a>CSS3 图片变模糊 (filter)</h3><ul>
<li><p>CSS3 新增的滤镜属性</p>
</li>
<li><p>语法规范：</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">div</span> &#123;</span><br><span class="line">  <span class="attribute">filter</span>: 函数();</span><br><span class="line">  <span class="comment">/* 例：filter: blur(5px); blur 模糊处理 ，数值越大越模糊 */</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>  函数可以通过 <a target="_blank" rel="external nofollow noopener noreferrer" href="https://developer.mozilla.org/zh-CN/">MDN</a> 查询</p>
</li>
</ul>
<h3 id="CSS3 执行计算函数 -calc"><a href="#CSS3 执行计算函数 -calc" class="headerlink" title="CSS3 执行计算函数 (calc)"></a>CSS3 执行计算函数 (calc)</h3><ul>
<li><p>语法规范：</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">div</span> &#123;</span><br><span class="line">  <span class="attribute">width</span>: <span class="built_in">calc</span>(<span class="number">100%</span>-<span class="number">80px</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>  使用场景，子盒子永远比父盒子小 80px (用于经常改变宽度的父盒子)</p>
</li>
</ul>
<h3 id="CSS3 过渡属性 -transition"><a href="#CSS3 过渡属性 -transition" class="headerlink" title="CSS3 过渡属性 (transition)"></a>CSS3 过渡属性 (transition)</h3><ul>
<li><p>经常和 :hover 一起使用</p>
</li>
<li><p>语法规范：</p>
  <figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">div</span> &#123;</span><br><span class="line">  <span class="attribute">transition</span>: 要过渡的属性 花费时间 运动曲线 何时开始;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<table>
<thead>
<tr>
<th align="center">属性值</th>
<th align="center">描述</th>
</tr>
</thead>
<tbody><tr>
<td align="center">要过渡的属性</td>
<td align="center">想要变化的 CSS 属性，高度宽度内外边距颜色都可以，所有属性都过渡写 all</td>
</tr>
<tr>
<td align="center">花费时间</td>
<td align="center">单位秒(必须写单位)</td>
</tr>
<tr>
<td align="center">运动曲线</td>
<td align="center">默认 ease (逐渐慢下来)</td>
</tr>
<tr>
<td align="center">何时开始</td>
<td align="center">单位秒，设置延迟触发时间(必须有单位) 默认 0s</td>
</tr>
</tbody></table>
</li>
<li><p>注意：transition 属性一定要写到开始变化的元素上</p>
</li>
<li><p>后面两个属性可以省略</p>
</li>
<li><p>  同时修改两个属性 (修改效果不同) 时：</p>
</li>
</ul>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">div</span> &#123;</span><br><span class="line">  <span class="attribute">transition</span>: width .<span class="number">5s</span> ease <span class="number">1s</span>, height .<span class="number">5s</span> ease <span class="number">1s</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>


<p>​<br>​    </p>
<ul>
<li>  修改效果相同时 选择属性写 all</li>
</ul>
<h4 id="过渡属性实例：进度条"><a href="# 过渡属性实例：进度条" class="headerlink" title="过渡属性实例：进度条"></a>过渡属性实例：进度条</h4><ul>
<li><p>代码示例：</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.bar</span> &#123;</span></span><br><span class="line"><span class="css">    <span class="attribute">width</span>: <span class="number">150px</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">height</span>: <span class="number">15px</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">border</span>: <span class="number">1px</span> solid red;</span></span><br><span class="line"><span class="css">    <span class="attribute">border-radius</span>: <span class="number">7px</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">padding</span>: <span class="number">1px</span> <span class="number">0</span>;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.bar_in</span> &#123;</span></span><br><span class="line"><span class="css">    <span class="attribute">width</span>: <span class="number">50%</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">height</span>: <span class="number">15px</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">background-color</span>: red;</span></span><br><span class="line"><span class="css">    <span class="attribute">border-radius</span>: <span class="number">7px</span>;</span></span><br><span class="line"><span class="css">    <span class="attribute">transition</span>: all <span class="number">1.5s</span>;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.bar</span><span class="selector-pseudo">:hover</span> <span class="selector-class">.bar_in</span> &#123;</span></span><br><span class="line"><span class="css">    <span class="attribute">width</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;bar&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;bar_in&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
</ul>
<h4 id="过渡属性实例 - 小米 logo 切换"><a href="# 过渡属性实例 - 小米 logo 切换" class="headerlink" title="过渡属性实例 小米 logo 切换"></a>过渡属性实例 小米 logo 切换</h4><ul>
<li><p>代码案例：</p>
  <figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.mi_box</span> &#123;</span></span><br><span class="line"><span class="css">      <span class="attribute">width</span>: <span class="number">50px</span>;</span></span><br><span class="line"><span class="css">      <span class="attribute">height</span>: <span class="number">50px</span>;</span></span><br><span class="line"><span class="css">      <span class="attribute">background-color</span>: <span class="number">#ff6700</span>;</span></span><br><span class="line"><span class="css">      <span class="attribute">margin</span>: <span class="number">100px</span> auto;</span></span><br><span class="line"><span class="css">      <span class="attribute">position</span>: relative;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.mi_logo</span> &#123;</span></span><br><span class="line"><span class="css">      <span class="attribute">position</span>: absolute;</span></span><br><span class="line"><span class="css">      <span class="attribute">top</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="css">      <span class="attribute">right</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="css">      <span class="attribute">transition</span>: all .<span class="number">5s</span>;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.mi_home</span> &#123;</span></span><br><span class="line"><span class="css">      <span class="attribute">position</span>: absolute;</span></span><br><span class="line"><span class="css">      <span class="attribute">top</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="css">      <span class="attribute">right</span>: -<span class="number">50px</span>;</span></span><br><span class="line"><span class="css">      <span class="attribute">transition</span>: all .<span class="number">5s</span>;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.mi_box</span><span class="selector-pseudo">:hover</span> <span class="selector-class">.mi_logo</span> &#123;</span></span><br><span class="line"><span class="css">      <span class="attribute">right</span>: <span class="number">50px</span>;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span></span><br><span class="line"><span class="css">  <span class="selector-class">.mi_box</span><span class="selector-pseudo">:hover</span> <span class="selector-class">.mi_home</span> &#123;</span></span><br><span class="line"><span class="css">      <span class="attribute">right</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="css">  &#125;</span></span><br><span class="line"><span class="css"></span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;mi_box&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;mi_logo&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">&quot;image/mi-logo.png&quot;</span> <span class="attr">alt</span>=<span class="string">&quot;mi-logo&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;mi_home&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">&quot;image/mi-home.png&quot;</span> <span class="attr">alt</span>=<span class="string">&quot;mi-home&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
</ul>
<blockquote>
<p>本文转载自<a target="_blank" rel="external nofollow noopener noreferrer" href="https://blog.csdn.net/weixin_46170034/article/details/104457515">https://blog.csdn.net/weixin_46170034/article/details/104457515</a></p>
</blockquote>

    </div>

    
    
    
      
  <div class="popular-posts-header">相关文章推荐</div>
  <ul class="popular-posts">
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\88f0ef65.html" rel="bookmark">HTML 与 CSS 学习 1</a></div>
    </li>
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\11f9bedf.html" rel="bookmark">HTML 与 CSS 学习 2</a></div>
    </li>
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\66fe8e49.html" rel="bookmark">HTML 与 CSS 学习 3</a></div>
    </li>
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\f89a1bea.html" rel="bookmark">HTML 与 CSS 学习 4</a></div>
    </li>
    <li class="popular-posts-item">
      <div class="popular-posts-title"><a href="\archives\8f9d2b7c.html" rel="bookmark">HTML 与 CSS 学习 5</a></div>
    </li>
  </ul>

        <div class="reward-container">
  <div>感谢各位打赏的小伙伴</div>
  <button onclick="var qr = document.getElementById('qr'); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">
      
      <div style="display: inline-block;">
        <img src="/images/wechatpay.png" alt="肥肉啊肥肉你在哪 微信支付">
        <p>微信支付</p>
      </div>
      
      <div style="display: inline-block;">
        <img src="/images/alipay.png" alt="肥肉啊肥肉你在哪 支付宝">
        <p>支付宝</p>
      </div>

  </div>
</div>

        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>肥肉啊肥肉你在哪
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://fat_fat_where_are_you.gitee.io/archives/f12c57c1.html" title="HTML 与 CSS 学习 8">http://fat_fat_where_are_you.gitee.io/archives/f12c57c1.html</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noopener noreferrer" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/HTML%E4%B8%8ECSS/" rel="tag"><i class="fas fa-tags"></i> HTML与CSS</a>
          </div>

        
  <div class="post-widgets">
    <div class="wp_rating">
      <div id="wpac-rating"></div>
    </div>
  </div>


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/archives/61934a50.html" rel="prev" title="HTML 与 CSS 学习 7">
      <i class="fa fa-chevron-left"></i> HTML 与 CSS 学习 7
    </a></div>
      <div class="post-nav-item">
    <a href="/archives/862b6757.html" rel="next" title="HTML 与 CSS 学习 9">
      HTML 与 CSS 学习 9 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#HTML%20%E4%B8%8E%20CSS%20%E5%AD%A6%E4%B9%A0%208"><span class="nav-text">HTML 与 CSS 学习 8</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#HTML5%20%E6%96%B0%E7%89%B9%E6%80%A7"><span class="nav-text">HTML5 新特性</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#HTML5%20%E6%96%B0%E5%A2%9E%E8%AF%AD%E4%B9%89%E5%8C%96%E6%A0%87%E7%AD%BE"><span class="nav-text">HTML5 新增语义化标签</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#HTML5%20%E6%96%B0%E5%A2%9E%E7%9A%84%E5%A4%9A%E5%AA%92%E4%BD%93%E6%A0%87%E7%AD%BE"><span class="nav-text">HTML5 新增的多媒体标签</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E8%A7%86%E9%A2%91%E6%A0%87%E7%AD%BE%20-video"><span class="nav-text">视频标签 (video)</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E9%9F%B3%E9%A2%91%E6%A0%87%E7%AD%BE%20-audio"><span class="nav-text">音频标签 (audio)</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#HTML5%20%E6%96%B0%E5%A2%9E%20input%20%E8%A1%A8%E5%8D%95"><span class="nav-text">HTML5 新增 input 表单</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#HTML5%20%E6%96%B0%E5%A2%9E%E8%A1%A8%E5%8D%95%E5%B1%9E%E6%80%A7"><span class="nav-text">HTML5 新增表单属性</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#CSS3%20%E6%96%B0%E7%89%B9%E6%80%A7"><span class="nav-text">CSS3 新特性</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#CSS3%20%E6%96%B0%E5%A2%9E%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-text">CSS3 新增选择器</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%B1%9E%E6%80%A7%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-text">属性选择器 []</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E7%BB%93%E6%9E%84%E4%BC%AA%E7%B1%BB%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-text">结构伪类选择器</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#child%20%E7%B1%BB%E5%9E%8B"><span class="nav-text">child 类型</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#of-type%20%E7%B1%BB"><span class="nav-text">of-type 类</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E4%BC%AA%E5%85%83%E7%B4%A0%E9%80%89%E6%8B%A9%E5%99%A8"><span class="nav-text">伪元素选择器</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#%E4%BC%AA%E5%85%83%E7%B4%A0%E5%AE%9E%E4%BE%8B"><span class="nav-text">伪元素实例</span></a></li></ol></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CSS3%20%E7%9B%92%E5%AD%90%E6%A8%A1%E5%9E%8B%20-box-sizing"><span class="nav-text">CSS3 盒子模型 (box-sizing)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CSS3%20%E5%9B%BE%E7%89%87%E5%8F%98%E6%A8%A1%E7%B3%8A%20-filter"><span class="nav-text">CSS3 图片变模糊 (filter)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CSS3%20%E6%89%A7%E8%A1%8C%E8%AE%A1%E7%AE%97%E5%87%BD%E6%95%B0%20-calc"><span class="nav-text">CSS3 执行计算函数 (calc)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CSS3%20%E8%BF%87%E6%B8%A1%E5%B1%9E%E6%80%A7%20-transition"><span class="nav-text">CSS3 过渡属性 (transition)</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E8%BF%87%E6%B8%A1%E5%B1%9E%E6%80%A7%E5%AE%9E%E4%BE%8B%EF%BC%9A%E8%BF%9B%E5%BA%A6%E6%9D%A1"><span class="nav-text">过渡属性实例：进度条</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E8%BF%87%E6%B8%A1%E5%B1%9E%E6%80%A7%E5%AE%9E%E4%BE%8B%20-%20%E5%B0%8F%E7%B1%B3%20logo%20%E5%88%87%E6%8D%A2"><span class="nav-text">过渡属性实例 小米 logo 切换</span></a></li></ol></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="肥肉啊肥肉你在哪" src="/images/touxiang.gif">
  <p class="site-author-name" itemprop="name">肥肉啊肥肉你在哪</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">38</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">16</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/feirouafeirou" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;feirouafeirou" rel="external nofollow noopener noreferrer" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="http://wpa.qq.com/msgrd?v=3&uin=1729013657&site=qq&menu=yes" title="QQ → http:&#x2F;&#x2F;wpa.qq.com&#x2F;msgrd?v&#x3D;3&amp;uin&#x3D;1729013657&amp;site&#x3D;qq&amp;menu&#x3D;yes" rel="external nofollow noopener noreferrer" target="_blank"><i class="fab fa-qq fa-fw"></i>QQ</a>
      </span>
  </div>


  <div class="links-of-blogroll motion-element">
    <div class="links-of-blogroll-title"><i class="fa fa-link fa-fw"></i>
      友情链接
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="http://www.woshipm.com/" title="http:&#x2F;&#x2F;www.woshipm.com" rel="external nofollow noopener noreferrer" target="_blank">人人都是产品经理</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="http://www.chanpin100.com/" title="http:&#x2F;&#x2F;www.chanpin100.com" rel="external nofollow noopener noreferrer" target="_blank">产品壹佰</a>
        </li>
    </ul>
  </div>

      </div>

    </div>
  </aside>

  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 2020 – 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">肥肉啊肥肉你在哪</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-area"></i>
    </span>
    <span title="站点总字数">237k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">3:35</span>
</div>

<div class="translate-style">
繁/简：<a id="translateLink" href="javascript:translatePage();">繁体
</a>
</div>
<script type="text/javascript" src="/js/tw_cn.js"></script>
<script type="text/javascript">
var defaultEncoding = 2; //网站编写字体是否繁体，1-繁体，2-简体
var translateDelay = 0; //延迟时间,若不在前, 要设定延迟翻译时间, 如100表示100ms,默认为0
var cookieDomain = "https://feirouafeirou.github.io/"; //Cookie地址, 一定要设定, 通常为你的网址
var msgToTraditionalChinese = "繁体"; //此处可以更改为你想要显示的文字
var msgToSimplifiedChinese = "简体"; //同上，但两处均不建议更改
var translateButtonId = "translateLink"; //默认互换id
translateInitilization();
</script>


        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
  <script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>


  <script defer src="/lib/three/three.min.js"></script>


  



  <script>
  if (CONFIG.page.isPost) {
    wpac_init = window.wpac_init || [];
    wpac_init.push({
      widget: 'Rating',
      id    : 26171,
      el    : 'wpac-rating',
      color : 'fc6423'
    });
    (function() {
      if ('WIDGETPACK_LOADED' in window) return;
      WIDGETPACK_LOADED = true;
      var mc = document.createElement('script');
      mc.type = 'text/javascript';
      mc.async = true;
      mc.src = '//embed.widgetpack.com/widget.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
    })();
  }
  </script>

  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : 'puzQn5yHhkbtBj2VGFbqJ4FE-MdYXbMMI',
      appKey     : 'lmcgKM2surcxNxMRiqInHjkU',
      placeholder: "Just go go",
      avatar     : 'retro',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : '' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>
<div class="moon-menu">
  <div class="moon-menu-items">
    
    <div id="moon-menu-item-back2bottom" class="moon-menu-item" onclick="back2bottom()">
      <i class="fa fa-chevron-down"></i>    </div>
    
    <div id="moon-menu-item-back2top" class="moon-menu-item" onclick="back2top()">
      <i class="fa fa-chevron-up"></i>    </div>
    
  </div>
  <div class="moon-menu-button">
    <svg class="moon-menu-bg">
      <circle class="moon-menu-cricle" cx="50%" cy="50%" r="44%"/>
      <circle class="moon-menu-border" cx="50%" cy="50%" r="48%"/>
    </svg>
    <div class="moon-menu-content">
      <div class="moon-menu-icon"><i class="fas fa-ellipsis-v"></i></div>
      <div class="moon-menu-text"></div>
    </div>
  </div>
</div><script src="/js/injector.js"></script>
<!-- 数字雨 -->
<!-- <canvas id="canvas" width="1440" height="900" ></canvas> -->
<!-- <script type="text/javascript" src="/js/src/DigitalRain.js"></script> -->
<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/src/clicklove.js"></script>
<!--浏览器搞笑标题-->
<script type="text/javascript" src="/js/FunnyTitle.js"></script>
<!-- Live2D看板娘 -->
<!-- <script src="/live2d-widget/autoload.js"></script> -->
<!-- <script src="https://feirouafeirou.github.io/live2d-widget/autoload.js"></script> -->
<!-- 网页音乐播放器 -->
<!-- <link rel="stylesheet" href="/dist/APlayer.min.css">
<div id="aplayer"></div>
<script type="text/javascript" src="/dist/APlayer.min.js"></script>
<script type="text/javascript" src="/dist/music.js"></script> -->
</body>

</html>
